package com.priserve.retirement.entities;

// Generated Apr 27, 2013 9:50:19 PM by Hibernate Tools 4.0.0

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Advisor generated by hbm2java
 */
@Entity
@Table(name = "advisor", catalog = "priserve")
public class Advisor implements java.io.Serializable {

	private Long advisorId;
	private Profilegroup profilegroup;
	private String firstName;
	private String lastName;
	private Long loginId;
	private Set<Clientinformation> clientinformations = new HashSet<Clientinformation>(
			0);

	public Advisor() {
	}

	public Advisor(Profilegroup profilegroup, String firstName,
			String lastName, Long loginId,
			Set<Clientinformation> clientinformations) {
		this.profilegroup = profilegroup;
		this.firstName = firstName;
		this.lastName = lastName;
		this.loginId = loginId;
		this.clientinformations = clientinformations;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "advisorId", unique = true, nullable = false)
	public Long getAdvisorId() {
		return this.advisorId;
	}

	public void setAdvisorId(Long advisorId) {
		this.advisorId = advisorId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "profileGROUPId")
	public Profilegroup getProfilegroup() {
		return this.profilegroup;
	}

	public void setProfilegroup(Profilegroup profilegroup) {
		this.profilegroup = profilegroup;
	}

	@Column(name = "firstName")
	public String getFirstName() {
		return this.firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	@Column(name = "lastName")
	public String getLastName() {
		return this.lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	@Column(name = "loginId")
	public Long getLoginId() {
		return this.loginId;
	}

	public void setLoginId(Long loginId) {
		this.loginId = loginId;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "advisor")
	public Set<Clientinformation> getClientinformations() {
		return this.clientinformations;
	}

	public void setClientinformations(Set<Clientinformation> clientinformations) {
		this.clientinformations = clientinformations;
	}

}
